package guru.springframework.bean;

/**
 * @Description:
 * @author hp
 * @date 2018年8月13日 下午5:50:26
 */

public class Result {

	private String code;
	
	private String msg;

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}
	
	public static Result success(String msg){
		Result r = new Result();
		r.setCode("1");
		r.setMsg(msg);
		return r;
	}
	
	public static Result fail(String failMsg){
		Result r = new Result();
		r.setCode("0");
		r.setMsg(failMsg);
		return r;
	}
	
}
